<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .container {
            list-style: none;
            width: 170px;
            height: 170px;
            background-color: blue;
            padding-top: 5px;
            padding-right: 5px;
        }

        .box {
            float: left;
            width: 50px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            background-color: white;
            cursor: pointer;
            margin-left: 5px;
            margin-bottom: 5px;
        }

        li.box:hover {
            box-shadow: 0 0 0 5px red;
        }
    </style>
</head>

<body>
    <h4>使用HTML+CSS实现如图布局，border-width:5px，格子大小是50px*50px，hover时 边框变成红色，需要考虑语义化。</h4>
    <ul class="container">
        <li class="box">1</li>
        <li class="box">2</li>
        <li class="box">3</li>
        <li class="box">4</li>
        <li class="box">5</li>
        <li class="box">6</li>
        <li class="box">7</li>
        <li class="box">8</li>
        <li class="box">9</li>
    </ul>
</body>

</html>